A method of deciding where to do trapping of color image data while the data is in run length encoded form by determining if there is a color edge between pixels on the current or adjacent scan lines, and invoking the trap generator if there is.
If there is even a small amount of misregistration between the printer separations (typically cyan, magenta, yellow, and black in a color printer), regions of high color contrast will show either a dark band or a white fringe, depending on the direction of the color misregistrations. These unwanted dark bands will be particularly visible in the presence of light colors; conversely, the white fringe will be particularly noticeable in the presence of dark colors.
The method of correcting for these misregistration zones, called “trapping”, usually involves extending the color separations one or more pixels to overlay the edge. The color of the “trap zone” is chosen such that it is nearly imperceptible in the presence of the two initial colors when viewed from afar. The result is an insignificant loss of detail and an elimination of the edge defect.
Trapping is a two step process. The first step is to locate the edge, and the second is to generate the overlay of one or more pixels, in any combination of the color separations.
The second step is done by a “trapping generator”. The two inputs for the trapping generator are the colors on both sides of the edge in question. As an example, consider magenta and cyan, with a user-specified maximum trap width of two. The generator will compute from these whether trapping is necessary, what color to use, and where it should be applied. In our example, the correction could be zero (no trapping), one, or two pixels in width, and could be any combination of cyan, magenta, yellow and black, and could be located in either the magenta or cyan area. Various forms of trapping generators are described in U.S. patent application Ser. Nos. 09/176 969, 09/176 970 and 09/177 276, and are incorporated herein by reference.
The first step in the trapping process is to determine where there is an edge on which to apply trapping. Trapping is typically used between pixels that are not of identical color, but it can be used in other locations as well. In addition, it is typically applied to decompressed image data (pixel encoded) but it would be convenient if it could be applied to image data that is still in run length encoded form. The invention described below is such a method.